<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>多组件共享数据</title>
    <script src="https://unpkg.com/vue@next"></script>
    <script src="https://unpkg.com/vuex@next"></script>
</head>
<body>

    <div id="input">
        <input type="text" v-model="message">
    </div>
    <div id="first">{{message}}</div>
    <div id="second">{{message}}</div>
    <a href="https://juejin.cn/post/6958395697133518878">vue3中ref和reactive</a>
    <script>
        const x = Vue.reactive( { message: '周一早上如果没有48小时核算不准进入办公楼' } );
        //const x = { message: '周一早上如果没有48小时核算不准进入办公楼' }

        const input = Vue.createApp( {
            data(){
                return x ;
            }
        });

        input.mount( "#input" );

        const first = Vue.createApp( {
            data(){
                return x ;
            }
        });
        first.mount( "#first" );

        const second = Vue.createApp( {
            data(){
                return x ;
            }
        });
        second.mount( "#second" );
    </script>

</body>
</html>